<template>
	<view class="container">
		<uni-nav-bar @clickLeft="clickLeft" fixed="true" left-icon="arrowleft" title="热门歌曲" background-color="#d44439" color="white"></uni-nav-bar>
		<DaoHang @change="change"></DaoHang>
		<hotsing :info="info"></hotsing>
	</view>
</template>

<script>
	import {song} from '../../api/newSingtuiJian/newSingtuiJian.js'
	import hotsing from '../../components/fenglei/fenglei.vue'
	import DaoHang from '../../components/geshoulist/geshoulist.vue'
	export default {
		onLoad() {
			song({type:7}).then(res => {
				this.info = res.data
			})
		},
		data() {
			return {
				info:[]
			}
		},
		methods:{
			clickLeft(){
				uni.navigateBack({
				    delta: 1
				})
			},
			change(id){
				song({type:id}).then(res => {
					this.info = res.data
				})
			}
		},
		components:{
			hotsing,
			DaoHang
		}
	}
</script>

<style lang="scss">
	.container{
		width: 750rpx;
	}
</style>
